package com.zhou;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * T21
 *
 * @author zhouxianfeng
 * @date 2021-9-7
 */
public class T21 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int start = sc.nextInt();
            int end = sc.nextInt();
            resolve1(start, end);
        }
    }

    /**
     * 百位，十位，个位
     *
     * @param start
     * @param end
     */
    public static void resolve(int start, int end) {
        int hundredBit = start / 100;
        int ten = (start % 100) / 10;
        int bit = start % 10;

        while (true) {
            int hundredBits = hundredBit * hundredBit * hundredBit;
            int tenBits = ten * ten * ten;
            int bits = bit * bit * bit;
        }
    }

    public static void resolve1(int start, int end) {

        List<String> res = new ArrayList<>();
        for (int i = start; i <= end; i++) {
            int hundredBit = i / 100;
            int ten = (i % 100) / 10;
            int bit = i % 10;
            int total =
                    hundredBit * hundredBit * hundredBit + ten * ten * ten + bit * bit * bit;
            if (total == i) {
                res.add(i + "");
            }
        }
        if (res.size() == 0) {
            System.out.println("no");
        } else {
            System.out.println(String.join(" ", res));
        }

    }
}
